package com.geek.water.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * @author yangwenqi
 * @decs TODO
 * @date 2025/7/25
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("site")
@ApiModel(description = "站点表")
public class Site implements Serializable {
    @ApiModelProperty("主键，自增站点ID")
    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("关联客户ID")
    @TableField("customer_id")
    private Long customerId;

    @ApiModelProperty("站点名称")
    @TableField("name")
    private String name;

    @ApiModelProperty("详细地址")
    @TableField("address")
    private String address;

    @ApiModelProperty("纬度")
    @TableField("latitude")
    private Double latitude;

    @ApiModelProperty("经度")
    @TableField("longitude")
    private Double longitude;

    @ApiModelProperty("地图标记颜色")
    @TableField("marker_color")
    private String markerColor = "#FF0000";

    @ApiModelProperty("地图标记描述")
    @TableField("marker_description")
    private String markerDescription;

    @ApiModelProperty("是否在地图上显示")
    @TableField("show_on_map")
    private Boolean showOnMap = true;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建时间")
    private LocalDateTime createdAt;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty("更新时间")
    private LocalDateTime updatedAt;

    @TableField(exist = false)
    private List<Area> areas;
}

